package org.yf.samples.dao;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import org.yf.samples.model.ExamRole;

@Repository
@Transactional
public class ExamRoleDAOImpl extends BaseHibernateDAO<ExamRole> implements IExamRoleDAO {

	@Override
	public ExamRole getExamRoleById(Integer id) {
		return this.get(id);
	}

	@Override
	public ExamRole getExamRoleByName(String name) {
		return this.queryForObject("FROM ExamRole AS r WHERE r.name=? ", new Object[]{name});
	}

}
